import request from '@/utils/request'
import requests from '@/utils/subOrderForm'
export function userList (data) {//用户列表
  return request({
    url: '/ucenter/user/datums/search',
    method: 'get',
    params : data
  })
}
export function userdetails (userId) {//用户详情
  return request({
    url: '/ucenter/user/datums/' + userId,
    method: 'get',
  })
}
export function userRecord (userId) {//用户购买记录
  return request({
    url: '/mall-oms/mall/order/userlist',
    method: 'get',
    params : userId
  })
}
export function userConsign (userId) {//用户寄卖记录
  return request({
    url: '/oms/order/user/page',
    method: 'get',
    params : userId
  })
}
export function userRedeem (userId) {//用户赎回记录
  return request({
    url: '/oms/order/user/page',
    method: 'get',
    params : userId
  })
}
export function discountlist (userId) {//用户优惠券记录
  return request({
    url: '/coupon-center/coupon/user/receive/userlist',
    method: 'get',
    params : userId
  })
}
export function bankList (userId) {//银行卡记录
  return request({
    url: '/ucenter/user/datums/bindBank/' + userId,
    method: 'get',
  })
}
export function withdrawlist (data) {//提现记录
  return request({
    url: '/ucenter/user/datums/withdrawbill',
    method: 'get',
    params : data
  })
}

export function userLock (data) {//用户账号锁定
  return requests({
    url: '/ucenter/user/datums/lock',
    method: 'put',
    data
  })
}
export function unuserLock (userId) {//用户账号解锁
  return requests({
    url: '/ucenter/user/datums/unlock/' + userId,
    method: 'put',
  })
}
